home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-9.10-netbook-remix-PL.iso / casper / filesystem.squashfs / usr / share / gtksourceview-2.0 / language-specs / t2t.lang < prev    next >
Encoding:
Extensible Markup Language  |  2009-10-02  |  5.0 KB  |  149 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  
  4.  Author: Yevgen Muntyan <muntyan@tamu.edu>
  5.  Copyright (C) 2008 Yevgen Muntyan <muntyan@tamu.edu>
  6.  
  7.  This library is free software; you can redistribute it and/or modify
  8.  it under the terms of the GNU General Public License as published by
  9.  the Free Software Foundation; either version 2 of the License, or
  10.  (at your option) any later version.
  11.  
  12.  This program is distributed in the hope that it will be useful,
  13.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  GNU General Public License for more details.
  16.  
  17.  You should have received a copy of the GNU General Public License
  18.  along with this program; if not, write to the Free Software
  19.  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  20.  
  21. -->
  22. <language id="t2t" _name="Text2Tags" version="2.0" _section="Markup">
  23.   <metadata>
  24.     <property name="globs">*.t2t</property>
  25.     <property name="line-comment-start">%</property>
  26.   </metadata>
  27.  
  28.   <styles>
  29.     <style id="comment" _name="Comment"/>
  30.     <style id="option" _name="Option"/>
  31.     <style id="option-name" _name="Option Name" map-to="def:keyword"/>
  32.     <style id="header" _name="Header" map-to="def:keyword"/>
  33.     <style id="section" _name="Section" map-to="def:keyword"/>
  34.     <style id="section-1" _name="Section 1" map-to="t2t:section"/>
  35.     <style id="section-2" _name="Section 2" map-to="t2t:section"/>
  36.     <style id="section-3" _name="Section 3" map-to="t2t:section"/>
  37.     <style id="section-4" _name="Section 4" map-to="t2t:section"/>
  38.     <style id="section-5" _name="Section 5" map-to="t2t:section"/>
  39.     <style id="anchor" _name="Anchor" map-to="t2t:section"/>
  40.     <style id="italic" _name="Italic"/>
  41.     <style id="bold" _name="Bold"/>
  42.     <style id="verbatim" _name="Verbatim"/>
  43.     <style id="verbatim-block" _name="Verbatim Block"/>
  44.   </styles>
  45.  
  46.   <definitions>
  47.     <context id="header" first-line-only="true" style-ref="header">
  48.       <match>.+</match>
  49.     </context>
  50.  
  51.     <context id="options">
  52.       <include>
  53.         <context id="option" style-ref="option">
  54.           <match>^(%!\s*(?:[Tt]arget|[Ee]ncoding|[Oo]ptions|[Pp](?:ost|re)proc|[Ii]nclude(?:conf)?|[Ss]tyle|[Gg]uicolors)(?:\(\S+\))?)\s*:.*</match>
  55.           <include>
  56.             <context id="option-name" sub-pattern="1" style-ref="option-name"/>
  57.           </include>
  58.         </context>
  59.         <context id="invalid-option" style-ref="def:error">
  60.           <match>^%!.*</match>
  61.         </context>
  62.       </include>
  63.     </context>
  64.  
  65.     <context id="comment" style-ref="comment" end-at-line-end="true">
  66.       <start>^%</start>
  67.     </context>
  68.  
  69.     <context id="sections">
  70.       <include>
  71.         <context id="section-1">
  72.           <match>^(=(?!=).*(?<!=)=)(?!=)(\[.*\])?</match>
  73.           <include>
  74.             <context sub-pattern="1" style-ref="section-1"/>
  75.             <context sub-pattern="2" style-ref="anchor"/>
  76.           </include>
  77.         </context>
  78.         <context id="section-2">
  79.           <match>^(==(?!=).*(?<!=)==)(?!=)(\[.*\])?</match>
  80.           <include>
  81.             <context sub-pattern="1" style-ref="section-2"/>
  82.             <context sub-pattern="2" style-ref="anchor"/>
  83.           </include>
  84.         </context>
  85.         <context id="section-3">
  86.           <match>^(===(?!=).*(?<!=)===)(?!=)(\[.*\])?</match>
  87.           <include>
  88.             <context sub-pattern="1" style-ref="section-3"/>
  89.             <context sub-pattern="2" style-ref="anchor"/>
  90.           </include>
  91.         </context>
  92.         <context id="section-4">
  93.           <match>^(====(?!=).*(?<!=)====)(?!=)(\[.*\])?</match>
  94.           <include>
  95.             <context sub-pattern="1" style-ref="section-4"/>
  96.             <context sub-pattern="2" style-ref="anchor"/>
  97.           </include>
  98.         </context>
  99.         <context id="section-5">
  100.           <match>^(=====(?!=).*(?<!=)=====)(?!=)(\[.*\])?</match>
  101.           <include>
  102.             <context sub-pattern="1" style-ref="section-5"/>
  103.             <context sub-pattern="2" style-ref="anchor"/>
  104.           </include>
  105.         </context>
  106.       </include>
  107.     </context>
  108.  
  109.     <context id="italic">
  110.       <match>//(.*?)//</match>
  111.       <include>
  112.         <context sub-pattern="1" style-ref="italic"/>
  113.       </include>
  114.     </context>
  115.  
  116.     <context id="bold">
  117.       <match>\*\*(.*?)\*\*</match>
  118.       <include>
  119.         <context sub-pattern="1" style-ref="bold"/>
  120.       </include>
  121.     </context>
  122.  
  123.     <context id="verbatim">
  124.       <match>``(.*?)``</match>
  125.       <include>
  126.         <context sub-pattern="1" style-ref="verbatim"/>
  127.       </include>
  128.     </context>
  129.  
  130.     <context id="verbatim-block" style-ref="verbatim-block" style-inside="true">
  131.       <start>^```$</start>
  132.       <end>^```$</end>
  133.     </context>
  134.  
  135.     <context id="t2t">
  136.       <include>
  137.         <context ref="header"/>
  138.         <context ref="sections"/>
  139.         <context ref="options"/>
  140.         <context ref="comment"/>
  141.         <context ref="italic"/>
  142.         <context ref="bold"/>
  143.         <context ref="verbatim"/>
  144.         <context ref="verbatim-block"/>
  145.       </include>
  146.     </context>
  147.   </definitions>
  148. </language>
  149.